const mongoose = require('mongoose')
// 创建约束
const schema = new mongoose.Schema({
	name: {type: String},
	contest:String,
	check: {type:String, default:"未审核"},
	match_date: Date,
	award_date: Date,
	students:[{id:String, name:String}],
	teachers: String,
	files:[{name:String, url:String}],
	videos:[{name:String, url:String}],
	compressed_files:[{name:String, url:String,}],
	organizer: String,
	editor_id:String,
	cover:{type:String, default:"../assets/师范学院logo.jpeg"},
	certificate_picture:String,
	intro:String,
})
// 输出具备约束的model模型
module.exports = mongoose.model('Achievement', schema)
